#ifndef _GAME_SCENARIO_H_
#define _GAME_SCENARIO_H_

#include "Box2D\Box2D.h"
#include "drawer.h"
#include "car.h"
#include "track.h"

struct SimulationParameters
{
	float32 a_timeStep;
	int32   a_velocityIterations;
	int32   a_positionIterations;

	void setDefaultValues();
};

struct DrawingTool
{
	Drawer  a_drawingMethods;
	uint32  a_drawingFlags;

	const uint32 shapeFlag;   
	const uint32 jointFlag;   
	const uint32 aabbFlag;   
	const uint32 pairFlag; 
	const uint32 massCenterFlag;

	DrawingTool();
	void setDefaultFlagValues();
	void setDrawingFlags();
};

class GameScenario               // TO DO : pointer members, no copy constructor  or operator=
{
private:
	SimulationParameters   a_simulationParameters;
	DrawingTool            a_drawingTool;
	b2World*              ap_gameWorld;
	b2Vec2*               ap_viewCenter;
	Car*                  ap_car;
	Track*                ap_track;
protected:
	void setupGameWorld();
	void setupSimulationParameters();
	void setupGameDrawer();
	void destroyGameWorld();
	void createGameObjects();
public:
	GameScenario();
	~GameScenario();
	void makeSimulationStep();
	void processPressKeyboardEvent(unsigned char key);
	void processHoldKeyboardEvent(unsigned char key);
	void connectToViewCenterSettings(b2Vec2& r_viewCenter);
};

#endif